Link to this headingAES
- Restricted to block size of 128 bits and keys sizes of 128, 192 and 256 bits.
- AES is a substitution-permutation network.
- AES-128 only takes 12.6 cycles per byte
Link to this headingWhy you don’t make your own
-
The SBox lookup is vulnerable to timing attacks
-
The SBox lookup is vulnerable to cache attacks
- Vulnerable to Meltdown and Spectre Vulnerabilities
-
Modern Libraries and CPUs use hardware specific instructions
AESENC: Perform one round of an AES encryption flowAESENCLAST: Perform the last round of an AES encryption flowAESDEC: Perform one round of an AES decryption flowAESDECLAST: Perform the last round of an AES decryption flowAESKEYGENASSIST: Assist in AES round key generationAESIMC: Assist in AES Inverse Mix ColumnsPCLMULQDQ: Carryless multiply (CLMUL)[3]
Cache/Timing info for Sbox lookup
In Pratice static time for Intel and Arm AES structions
Spector (Intel Hard) rollback
Link to this headingMath Concepts
https://www.samiam.org/galois.html
Link to this headingHow it works
Link to this headingKey Schedule
Different keys are used for each round of AES.
- 8 bit Circular rotation of a 32-bit word
1d2c3a4f -> 2c3a4f1d
void
- A rcon operation
1 is taken to the power of 2 for in times and if there is an overflow then will
/* Calculate the rcon used in key expansion */
unsigned char
The rounds constants look like
=
- Substitution box Operation (Inner loop)
- The input is a 32-bit word and an iteration number i. The output is a 32-bit word.
- Copy the input over to the output
- Use rotate to rotate the output eight bits to the left (As done in part 1)
- Apply Rijndael’s S-box on all four individual bytes in the output word. (As done in part 2)
- On just the first (leftmost, MSB) byte of the output word, exclusive or the byte with 2 to the power of i (rcon(i)).
/* This is the core key expansion, which, given a 4-byte value,
* does some scrambling */
void
Link to this headingExpanding a 128 bit key
void
Link to this headingExpanding a 192-bit key
void
Link to this headingExpanding a 256-bit key
void
Link to this headingAttacks
- There is possible related key attacks for AES.Related-key Cryptanalysis of the Full AES-192
and AES-256